﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductAdd.aspx.cs" Inherits="Customer_Profile.eCard.ProductAdd" %>

<%@ Register Src="~/mainTop.ascx" TagName="mainTop" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<HTML>
	<HEAD>
		<title>Menu Manage-Edit Menu</title>
		<link href="/css/style.css" rel="stylesheet" type="text/css">
        <script language="javascript" type="text/javascript" src="/js/common.js"></script>
    <script language="javascript" type="text/javascript" src="/js/CalPopUp.js"></script>
    <script language="javascript">
        function checkForm() {
            var Prod_code = document.getElementById("txtProdCode");
            var ProdName = document.getElementById("txtProdName").value;
            var discount = document.getElementById("txtDiscount").value;
            var commission_percent = document.getElementById("txtpercent").value;
            var settle_percent = document.getElementById("txtSettlePercent").value;
            var yeild = document.getElementById("txtyeild").value;
            var costing = document.getElementById("txt_costing").value;
            var init_amount = document.getElementById("txtInitAmount").value;
            var convert_ratio = document.getElementById("txt_convertratio").value;
            var Period = document.getElementById("txtPeriod").value;

            if (Prod_code == '') {
                alert("产品编码不能为空！");
                return false;
            }
            if (ProdName == '') {
                alert("产品名称不能为空！");
                return false;
            }
            if (discount == '') {
                alert("产品折扣不能为空！");
                return false;
            }
            if (commission_percent == '') {
                alert("产品销售返佣不能为空！");
                return false;
            }
            if (settle_percent == '') {
                alert("产品结算返佣不能为空！");
                return false;
            }

            if (yeild == '') {
                alert("产品年华收益率不能为空！");
                return false;
            }
            if (costing == '') {
                alert("产品成本不能为空！");
                return false;
            }
            if (init_amount == '') {
                alert("产品起始金额不能为空！");
                return false;
            }
            if (convert_ratio == '') {
                alert("产品转换年化率不能为空！");
                return false;
            }
            if (Period == '') {
                alert("产品期限不能为空！");
                return false;
            }
            return true;
        }
    </script>
	</HEAD>
	<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
	<form id="Form1" method="post" runat="server">
		<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td width="1" background="/images/dot_vline.gif"><img src="/images/spacer.gif" width="1" height="1"></td>
				<td width="15" valign="top"><img src="/images/spacer.gif" width="15" height="1"></td>
				<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td><img src="/images/spacer.gif" width="1" height="5"></td>
						</tr>
						<tr>
							<td height="23">
							    <span class="navi-blk">
                                    <uc1:mainTop ID="MainTop1" runat="server" />
							    System Manage><a href="UserManage.aspx">User Manage</a>>Add User
								</span>
							</td>
						</tr>
						<tr>
							<td background="/images/dot_hline.gif"><img src="/images/spacer.gif" width="1" height="1"></td>
						</tr>
					</table>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td><img src="/images/spacer.gif" width="1" height="8"></td>
						</tr>
					</table>
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
						
								<tr>
									<td valign="top">
										<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td bgcolor="#1765a7"><img src="/images/spacer.gif" width="1" height="3"></td>
											</tr>
											<tr>
												<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td width="12" class="bglist1"><img src="/images/arw_blu_rgt.gif" width="4" height="7"></td>
															<td class="bglist1">产品添加</td>
														</tr>
													</table>
												</td>
											</tr>
											<tr>
												<td><img src="/images/spacer.gif" width="1" height="1"></td>
											</tr>
										</table>
										<table width="100%" border="0" cellspacing="0" cellpadding="4">
											<tr>
												<td width="120" valign="top" class="bglist-3">
                                                    产品编码：</td>
												<td class="bglist-4"><input name="Prod_code" type="text" class="input2" id="txtProdCode" size="50" runat="server">
                                                <font color="red">*</font>
												</td>
											</tr>
											<tr>
												<td width="120" valign="top" class="bglist-3">
                                                    产品名称：</td>
												<td class="bglist-4"><input name="ProdName" type="text" class="input2" id="txtProdName" size="50" runat="server">
                                                <font color="red">*</font>
												</td>
											</tr>
                                            <tr>
												<td width="120" valign="top" class="bglist-3">
                                                    销售折扣：</td>
												<td class="bglist-4"><input name="discount" type="text" class="input2" id="txtDiscount" size="50" runat="server">
                                                <font color="red">*</font>
												</td>
											</tr>
                                            <tr>
												<td width="120" valign="top" class="bglist-3">
                                                    销售返佣比例：</td>
												<td class="bglist-4">
                                                    <input name="commission_percent" type="text" class="input2" id="txtpercent" size="50" runat="server">
                                                    <font color="red">*</font>
												</td>
											</tr>
                                            <tr>
												<td width="120" valign="top" class="bglist-3">
                                                    结算返佣比例：</td>
												<td class="bglist-4">
                                                    <input name="settle_percent" type="text" class="input2" id="txtSettlePercent" size="50" runat="server">
                                                    <font color="red">*</font>
												</td>
											</tr>
                                            <tr>
												<td width="120" valign="top" class="bglist-3">
                                                    年化收益率：</td>
												<td class="bglist-4">
                                                     <input name="yeild" type="text" class="input2" id="txtyeild" size="50" runat="server">
                                                     <font color="red">*</font>
												</td>
											</tr>
											<tr>
												<td class="bglist-3">成本：</td>
												<td class="bglist-4">
                                                    <input name="costing" type="text" class="input2" id="txt_costing" size="50" runat="server">
                                                    <font color="red">*</font>
                                                </td>
											</tr>
                                            <tr>
												<td class="bglist-3">起始金额：</td>
												<td class="bglist-4">
                                                    <input name="init_amount" type="text" class="input2" id="txtInitAmount" size="50" runat="server">元
                                                    <font color="red">*</font>
                                                </td>
											</tr>
                                            <tr>
												<td class="bglist-3">折算年华比例：</td>
												<td class="bglist-4">
                                                    <input name="convert_ratio" type="text" class="input2" id="txt_convertratio" size="50" runat="server">
                                                    <font color="red">*</font>
                                                </td>
											</tr>
                                            <tr>
												<td class="bglist-3">期限：</td>
												<td class="bglist-4">
                                                    <input name="Period" type="text" class="input2" id="txtPeriod" size="10" runat="server">
                                                     <asp:DropDownList ID="dropPeriodType"  CssClass="input3" runat="server"></asp:DropDownList>
                                                </td>
											</tr>
                                            <tr>
												<td class="bglist-3">是否指定日期：</td>
												<td class="bglist-4">
                                                    <asp:CheckBox ID="chk_ifappointDate" runat="server" Text="指定起息日及到期日" />
                                                </td>
											</tr>
                                            <tr>
                                                <td class="bglist-3">日期指定：</td>
                                                <td class="bglist-4">
                                                    从&nbsp;
                                                    <asp:TextBox ID="txtcreatedatebegin" runat="server" CssClass="input2" Width="120px"></asp:TextBox>&nbsp;
                                                    <img style="cursor: hand" onclick="JavaScript:calPopForCMon(txtcreatedatebegin, 'ss');" height="14" src="/images/dot_date.gif" width="16" align="absMiddle">
                                                    &nbsp;到&nbsp;
                                                    <asp:TextBox ID="txtcreatedateend" runat="server" CssClass="input2" Width="120px"></asp:TextBox>&nbsp;
                                                    <img style="cursor: hand" onclick="JavaScript:calPopForCMon(txtcreatedateend, 'ss');" height="14" src="/images/dot_date.gif" width="16" align="absMiddle">
                                                </td>
                                            </tr>
                                            <tr>
												<td class="bglist-3">是否有效：</td>
												<td class="bglist-4">
                                                    <asp:DropDownList ID="dropIf_used" CssClass="input3" runat="server">
                                                        <asp:ListItem Text="是" Value="Y"></asp:ListItem>
                                                        <asp:ListItem Text="否" Value="N"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </td>
											</tr>
											<tr>
												<td colspan="2" class="bglist-3"><div align="right">
                                                        <asp:Button ID="btnSave" runat="server" class="button" Text="添加" OnClientClick="return checkForm()" onclick="btnSave_Click" />&nbsp;
                                                        <asp:Button ID="btnEdit" runat="server" class="button" Text="修改" OnClientClick="return checkForm()" onclick="btnEdit_Click" />&nbsp;
                                                        <asp:Button ID="btnBack" runat="server" class="button" Text="后退" onclick="btnBack_Click" />
													</div>
												</td>
											</tr>

										</table>
									</td>
								</tr>
					</table>
				</td>
				<td width="10" valign="top"><img src="/images/spacer.gif" width="10" height="1"></td>
			</tr>
        </table>
	    </form>
	</body>
</HTML>